package com.xhj.client;

import com.xhj.vo.MemberVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Component
@FeignClient(value = "service-ucenter",fallback = UcenterClientImpl.class)
public interface UcenterClient {

    @ApiOperation(value = "根据id获取用户信息")
    @RequestMapping("/member/getInfo/{id}")
    public MemberVo getMemberInfoById(@PathVariable String id);
}

@Component
class UcenterClientImpl implements UcenterClient{

    @Override
    public MemberVo getMemberInfoById(String id) {
        return null;
    }
}